package com.example.design.decorator.cake;

/**
 * @Description 香肠装饰器
 * @ClassName SausageDecorator
 * @Author Administrator
 * @Date 2020/5/13 16:48
 * @Version 1.0.0
 */
public class SausageDecorator extends AbstractDecorator {
    public SausageDecorator(AbstractCake abstractCake) {
        super(abstractCake);
    }

    @Override
    protected void doSomething() {

    }
    @Override
    protected String getDesc() {
        return super.getDesc() + " 加一根香肠";
    }
    @Override
    protected int cost() {
        return super.cost() + 2;
    }

    public void sausage() {
        System.out.println(" 增加了一个香肠");
    }
}
